import { Redirect } from 'umi';

const auth = (props: any) => {
  const isLogin = true;
  return (
    <div>
      <div>auth start</div>
      {isLogin ? props.children : <Redirect to="/login" />}
      <div>auth end</div>
    </div>
  );
};

export default auth;
